package week_04;

public class ListNodeList {
    ListNode head;
    ListNode tail;

    public ListNodeList() {
        head = new ListNode();
        tail = new ListNode(-1);
        head.next = tail;
    }

    public void firstInsert(int val) {
        ListNode node = new ListNode(val);
        node.next = head.next;
        head.next = node;
    }

    public ListNode getList() {
        return head.next;
    }
}
